package com.ljfresh.customer.utils;

import java.util.Base64;

/**
 * @author: Lucifer
 * @time: 2020/4/14-8:43
 */
public class EncodUtil {
    public static String base64(String str){
        byte[] bytes = str.getBytes();

        //Base64 加密
        String encoded = Base64.getEncoder().encodeToString(bytes);
        return encoded;
    }

    public static void main(String[] args) {
        String aaa = "16a777d8ccff4f4a8301636134a28867";
        String str = "fd53afbcc7c3406a928c6f1fffae2c16";
        String a = base64(aaa);
        String s = base64(str);
        System.out.println(a);
        System.out.println(s);
    }
}
